import { appConfig } from '@/config'

export const getKeys = (key) => {
  return `${appConfig.storagePrefix}${key}`
}

export const removeKeys = (key) => {
  return `${appConfig.storagePrefix}${key}`
}

export const setKeys = (key) => {
  return `${appConfig.storagePrefix}${key}`
}

export function mapToObj(map) {
  const obj = Object.create(null)
  for (const [key, value] of map) {
    obj[key] = value
  }
  return obj
}

export function objTransformMap(obj) {
  return new Map(Object.entries(obj))
}
